# 简单的模块检查脚本
import os

# 将结果写入文件
with open('module_check_result.txt', 'w') as f:
    f.write("模块检查结果\n\n")
    
    # 检查pytesseract
    try:
        import pytesseract
        f.write("pytesseract: 已安装\n")
    except ImportError:
        f.write("pytesseract: 未安装\n")
    
    # 检查cv2
    try:
        import cv2
        f.write("cv2: 已安装\n")
    except ImportError:
        f.write("cv2: 未安装\n")
    
    # 检查numpy
    try:
        import numpy
        f.write("numpy: 已安装\n")
    except ImportError:
        f.write("numpy: 未安装\n")
    
    # 检查ocr_module
    try:
        from ocr_module import OCRProcessor
        f.write("OCRProcessor: 可以导入\n")
    except ImportError as e:
        f.write(f"OCRProcessor: 导入失败 - {str(e)}\n")

print("检查完成，结果已写入module_check_result.txt")